Baseline Type Constants
You can pass a constant of type kATSUBaselineClassTag to the function ATSUCalculateBaselineDeltas to specify the type of baseline you want used in calculating optimal baseline positions. To specify the standard baseline value from the current font, pass the constant kBSLNNoBaselineOverride.
You can also use a constant of this type to set or obtain the primary baseline in a style run; see the functions ATSUSetAttributes and ATSUGetAttribute respectively.
enum {
kBSLNRomanBaseline = 0,
kBSLNIdeographicCenterBaseline = 1,
kBSLNIdeographicLowBaseline = 2,
kBSLNHangingBaseline = 3,
kBSLNMathBaseline = 4,
kBSLNLastBaseline = 31,
kBSLNNumBaselineClasses = kBSLNLastBaseline + 1,
kBSLNNoBaselineOverride = 255
};
typedef UInt32 BslnBaselineClass;
Constant description
-
kBSLNRomanBaseline
-
Represents the baseline used by most Roman script languages, and in Arabic and Hebrew. This is the default value.
-
kBSLNIdeographicCenterBaseline
-
Represents the baseline used by Chinese, Japanese, and Korean ideographic scripts, in which ideographs are centered halfway on the line height.
-
kBSLNIdeographicLowBaseline
-
Represents the baseline used by Chinese, Japanese, and Korean scripts. Similar to kBSLNIdeographicCenterBaseline, but with the glyphs lowered. This baseline is most commonly used to align Roman glyphs within ideographic fonts to Roman glyphs in Roman fonts.
-
kBSLNHangingBaseline
-
Represents the baseline used by Devanagari and related scripts, in which the bulk of most glyphs is below the baseline. This baseline type is also used for drop capitals in Roman scripts.
-
kBSLNMathBaseline
-
Represents the baseline used for setting mathematics. It is centered on symbols such as the minus sign (at half the x-height).
-
kBSLNLastBaseline
-
No baseline type may exceed this value. Application-defined baseline values between kBSLNMathBaseline and kBSLNLastBaseline are reserved.
-
kBSLNNumBaselineClasses
-
Represents the total number of baseline types (kBSLNLastBaseline + 1).
-
kBSLNNoBaselineOverride
-
Instructs ATSUI to use the standard baseline value from the current font.
© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)